import type { GetCodeData, GetCodeParams, LoginCodeParams, LoginData, LoginParams } from "@/types/user";
import { request } from "@/utils/request";

// 1.密码登录
export const loginApi = (data:LoginParams) => request.post<null,LoginData>('/login/password',data)

// 2. 获取验证码
export const getCodeApi = (params:GetCodeParams) => request.get<null,GetCodeData>('/code',{params})
//3.短信验证码登录
export const loginByMobileApi  = (data:LoginCodeParams) => request.post<null,LoginData>('/login',data)
